package com.cyan.note.service.manager;

import com.cyan.note.common.ApiResult;
import com.cyan.note.dto.manager.config.OrderTypeConfigDTO;
import com.cyan.note.dto.manager.config.OrderSourceConfigDTO;
import com.cyan.note.entity.ShopSetting;

import java.util.List;
import java.util.Map;

/**
 * 店长端-设置配置服务接口
 * 
 * @author ZhangzhenYu
 * @since 2025-01-15
 */
public interface ManagerSettingService {

    /**
     * 获取店铺所有设置
     */
    ApiResult<Map<String, String>> getAllSettings(Long shopId);

    /**
     * 按分类获取设置
     */
    ApiResult<List<ShopSetting>> getSettingsByCategory(Long shopId, String category);

    /**
     * 获取单个设置值
     */
    ApiResult<String> getSettingValue(Long shopId, String settingKey);

    /**
     * 更新单个设置
     */
    ApiResult<Void> updateSetting(Long shopId, String settingKey, String settingValue, Long operatorId);

    /**
     * 批量更新设置
     */
    ApiResult<Void> batchUpdateSettings(Long shopId, List<ShopSetting> settings, Long operatorId);

    /**
     * 重置分类设置为默认值
     */
    ApiResult<Void> resetCategorySettings(Long shopId, String category, Long operatorId);

    /**
     * 获取订单类型配置
     */
    ApiResult<List<OrderTypeConfigDTO>> getOrderTypeConfig(Long shopId);

    /**
     * 更新订单类型配置
     */
    ApiResult<Void> updateOrderTypeConfig(Long shopId, List<OrderTypeConfigDTO> configs, Long operatorId);

    /**
     * 获取订单来源配置
     */
    ApiResult<List<OrderSourceConfigDTO>> getOrderSourceConfig(Long shopId);

    /**
     * 更新订单来源配置
     */
    ApiResult<Void> updateOrderSourceConfig(Long shopId, List<OrderSourceConfigDTO> configs, Long operatorId);

    /**
     * 获取系统参数设置
     */
    ApiResult<Map<String, Object>> getSystemSettings(Long shopId);

    /**
     * 更新系统参数设置
     */
    ApiResult<Void> updateSystemSettings(Long shopId, Map<String, Object> settings, Long operatorId);
}